import { cafReq } from "..";
import { QueryParams } from "../request";

/**
 * 根据ID查询
 * @param {object} params PageParamTransactionProcessQuery
 * @param {number} params.pageIndex
 * @param {number} params.pageSize
 * @param {object} params.condition
 * @param {array} params.sorts
 * @returns
 */
export const queryPage = async (params: QueryParams) => {
  return await cafReq(0).post(
    `/purchase-receipt/cost/transaction/process/v1/query`,
    params
  );
};
/**
 * 根据ID查询
 * @param {string} businessId 业务主键
 * @returns
 */
export const queryJournalEntriesByBusinessId = async (businessId: number) => {
  return await cafReq(0).get(
    `/purchase-receipt/cost/journal/entry/v1/query/${businessId}`
  );
};
